package kr.saeildamil.androidstudy.ch12;

import java.util.ArrayList;

import kr.saeildamil.androiddforstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

public class ListIconText extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch12_listview_test);
		
		ArrayList<MyItem> arList = new ArrayList<MyItem>();
		arList.add(new MyItem(R.drawable.ic_launcher, "삼성 노트북"));
		arList.add(new MyItem(R.drawable.ic_launcher, "LG 세탁기"));
		arList.add(new MyItem(R.drawable.ic_launcher, "대우 마티즈"));
		
		MyListAdapter adapter = new MyListAdapter(this, R.layout.ch12_icontext, arList);
		
		ListView listView = (ListView) findViewById(R.id.ch12_listviewtest_list);
		listView.setAdapter(adapter);
	}
}
